var BookManager = /** @class */ (function () {
    function BookManager() {
        this._fullName = '';
    }
    Object.defineProperty(BookManager.prototype, "fullName", {
        get: function () {
            console.log("get");
            return this._fullName;
        },
        set: function (name) {
            console.log("set");
            if (this.password === '123') {
                this._fullName = name;
                console.log("成功");
            }
            else {
                console.log("失败");
            }
        },
        enumerable: false,
        configurable: true
    });
    return BookManager;
}());
var mn = new BookManager();
// 没有设置密码
mn.fullName = '333';
console.log(mn.fullName);
// 设置密码
mn.password = "123";
mn.fullName = "333";
console.log(mn.fullName);
